export default {
  install(app: any) {
    // 定义全局组件
    const model = import.meta.glob("./*/*.vue", { eager: true });
    const components = {};
    // 动态注册组件
    for (const path in model) {
      let componentName = path.split("/")[2].split(".")[0];
      components[componentName] = model[path];
      app.component(componentName, model[path]);
    }
    console.log(components, "Echarts全局组件");
  },
};
